import { request } from '/src/api/service';

export function GetUserByRoleId(roleId) {
  return request({
    url: `/upms/roles/${roleId}/users`,
    method: 'get',
    params: roleId,
  });
}

export function DistributionUser(obj) {
  return request({
    url: `/upms/roles/${obj.roleId}/users`,
    method: 'post',
    data: obj,
  });
}

export function GetPermissionList(roleId) {
  return request({
    url: `/upms/roles/${roleId}/resources/permissions`,
    method: 'get',
    params: roleId,
  });
}

export function DistributionRoleAuthority(obj) {
  return request({
    url: `/upms/roles/${obj.roleId}/upms`,
    method: 'post',
    data: obj,
  });
}
